/*
 *	Copyright © 2013 Changsha kk Network Technology Co., Ltd. All rights reserved.
 *	长沙市师说网络科技有限公司 版权所有
 *	http://www.kk.com
 */

package com.hlingsoft.kkh.dao;

import com.hlingsoft.kkh.entity.Event;
import com.hlingsoft.kkh.entity.Focus;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 活动
 *
 * @author kk
 */
@Repository
public interface FocusDao {

    /**
     * 添加关注
     * @param focus
     * @return
     */
    public int addFocus(Focus focus);

    /**
     * 查询关注信息
     * @param fansId
     * @param attentionsId
     * @return
     */
    public Focus getFocus(@Param("fansId") long fansId,@Param("attentionsId") long attentionsId);


    public Focus getFocusWithNone(@Param("fansId") long fansId,@Param("attentionsId") long attentionsId);


    /**
     * 添加关注，取消关注
     * @param focus
     * @return
     */
    public int updateFocus(Focus focus);

    /**
     * 获取关注人列表
     * @param fansId
     * @return
     */
    public List<Focus> getAttentionsById(@Param("fansId") long fansId,@Param("offset") long offset,
                                         @Param("rows") long rows);


    public List<Focus> getAttentions2ById(@Param("fansId") long fansId);

    /**
     * 获取关注人数
     * @param fansId
     * @return
     */
    public long  getAttentionsByIdCount(@Param("fansId") long fansId);

    /**
     * 获取粉丝列表
     * @param attentionsId
     * @return
     */
    public List<Focus> getFansById(@Param("attentionsId") long attentionsId,@Param("offset") long offset,
                                   @Param("rows") long rows);

    /**
     * 获取粉丝数量
     * @param attentionsId
     * @return
     */
    public long getFansByIdCount(@Param("attentionsId") long attentionsId);


    public List<Focus> getFocusByAppUserId(@Param("appUserId") long appUserId);


    public List<Focus> getFocusByAppUserIdWithNone(@Param("appUserId") long appUserId);



}
